<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
    <script>
        // 发送 POST 请求

        axios({
            method:'post',
            url:'http://mengtion.vip/kfl-api/api/getproduct.php',
            // data:{
            //     firstName:'Fred',
            //     lastName:'Flintstone'
            // }
        }).then(res=>{
            console.log(res.data);
        })

        //get获取本地数据
        axios({
            method:'get',
            url:'/data/1.json',
        })

        .then((res)=>{
            console.log(res.data);
        })
    </script>
</body>
</html>